home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / nwtp06 / supeq.pas < prev    next >
Pascal/Delphi Source File  |  1996-07-10  |  1KB  |  38 lines

  1. {$X+,B-,V-,S-} {essential compiler directives}
  2.  
  3. Program SupEq; {as of 950301}
  4.  
  5. { Example for the nwBindry unit / NwTP 0.6 API. (c) 1993,1995, R.Spronk }
  6.  
  7. { Purpose: Shows all supervisor equivalent users. }
  8.  
  9. uses nwMisc,nwBindry;
  10.  
  11. Var Info    :TobjIdArray;
  12.     SeqNbr  :Longint;
  13.     NbrOfObj:word;
  14.     ObjName :string;
  15.     ObjType :word;
  16.     NbrOfEqUsers:word;
  17.     t       :word;
  18. begin
  19. writeln('Objects that are supervisor equivalent:');
  20. writeln;
  21. NbrOfEqUsers:=0;
  22. SeqNbr:=-1;
  23. REPEAT
  24.   if GetRelationOfBinderyObject('SUPERVISOR',1,'SECURITY_EQUALS',
  25.                                 SeqNbr,NbrOfObj,Info)
  26.    then for t:=1 to NbrOfObj
  27.          do begin
  28.             inc(NbrOfEqUsers);
  29.             write(HexStr(Info[t],8));
  30.             GetBinderyObjectName(Info[t],ObjName,ObjType);
  31.             writeln(' ',ObjName);
  32.             end;
  33. UNTIL SeqNbr=-1;
  34. if nwBindry.result<>0
  35.  then writeln('Search for security equivalent users aborted due to an error.');
  36. if NbrOfEqUsers=0
  37.  then writeln('No supervisor equivalent users found');
  38. end.